import request from '@/utils/request'

// api地址
const api = {
	list: 'ant.book/list',
	detail: 'ant.book/detail',
	add_paper: 'ant.book/add_paper',
	add_paper_again: 'ant.book/add_paper_again',
	paperQrcode: 'ant.book/paperQrcode',
}


// 文章列表
export function list(param, option) {
	return request.get(api.list, param, option)
}

// 文章详情
export function detail(articleId) {
	return request.get(api.detail, {
		articleId
	})
}
export const add_paper_again = (data) => {
	return request.post(api.add_paper_again, {
		form: data
	})
}
export const add_paper = (data) => {
	return request.post(api.add_paper, {
		form: data
	})
}
export function paperQrcode(paperId) {
	return request.get(api.paperQrcode, {
		paperId
	})
}